package com.atlin.project.model.vo.cds;

import com.atlin.project.model.domain.cds.ClientCode;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * 示例表
 *
 * @TableName clientCode
 */
@Data
public class ClientCodeVO implements Serializable {

    
    /**
     * 客户端标识码ID
     */
    
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 客户端标识码
     */
    private String code;

    /**
     * 文件夹路径
     */
    private String folderPath;

    /**
     * 
     */
    private Date updatedTime;

    /**
     * 
     */
    private Date createdTime;

    /**
     * 包装类转对象
     *
     * @param clientCodeVO
     * @return
     */
    public static ClientCode voToObj(ClientCodeVO clientCodeVO) {
        if (clientCodeVO == null) {
            return null;
        }
        ClientCode clientCode = new ClientCode();
        BeanUtils.copyProperties(clientCodeVO, clientCode);
        return clientCode;
    }


    /**
     * 对象转包装类
     *
     * @param clientCode
     * @return
     */
    public static ClientCodeVO objToVo(ClientCode clientCode) {
        if (clientCode == null) {
            return null;
        }
        ClientCodeVO clientCodeVO = new ClientCodeVO();
        BeanUtils.copyProperties(clientCode, clientCodeVO);

        return clientCodeVO;
    }

    private static final long serialVersionUID = 1L;
}